#ifndef THRESH_HH_
# define THRESH_HH_

# include "cv.h"
# include "highgui.h"
# include "tbb/blocked_range2d.h"
# include "tbb/parallel_for.h"

class ApplyThresh {
  IplImage* input;
  unsigned thresh;
  IplImage* output;
public:
  ApplyThresh (IplImage* input_,
	       unsigned thresh_);

  void operator() (const tbb::blocked_range2d<int>& r) const;

  IplImage*
  getOutput ();
};

IplImage*
threshold (IplImage* input,
	   unsigned thresh);

#endif /* !THRESH_HH_ */
